Skip to content

添加agent studio的cli能力 - #116

Merged
XXPermanentXX merged 23 commits into
mainfrom
feat/cma
Jul 27, 2026
Merged

添加agent studio的cli能力#116
XXPermanentXX merged 23 commits into
mainfrom
feat/cma

Conversation

@chenanran555

Copy link
Copy Markdown
Collaborator

No description provided.

# Conflicts:
#	packages/commands/src/commands/auth/login.ts
#	packages/commands/src/commands/config/set.ts
#	packages/commands/src/index.ts
#	packages/core/src/client/index.ts
#	packages/core/src/config/schema.ts
#	skills/bailian-cli/reference/auth.md
#	skills/bailian-cli/reference/config.md
#	skills/bailian-cli/reference/index.md

@XXPermanentXX XXPermanentXX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次接入方向基本正确:使用 @openagentpack/sdk,并把能力注册为真实 CLI command,而不是简单转发 argv;同时也补了 User-Agent、渠道 header 和部分错误适配。

但当前实现还没有完整接入 Bailian CLI 的宿主契约,在命令空间、鉴权/Profile、dry-run、结构化输出、错误分类、timeout、运行时兼容性和配置生命周期方面仍有阻塞问题。部分问题会产生真实误操作、账号错用或破坏自动化调用,因此本轮先 Request changes。

合入前至少需要完成:

  • 命令统一迁移到产品确认的独立命名空间,例如 bl cma ...
  • 建立明确的 Host Adapter,由 Bailian CLI 负责鉴权、Profile、遥测、输出、错误和 timeout;不要通过 SDK bootstrap 隐式接管这些能力。
  • 所有本地及远程 mutation 正确支持 --dry-run
  • 保证 --output json 的 stdout 始终只有一个合法 JSON 结果。
  • 解决 SDK Node >=22 与 Bailian CLI Node >=18.17 的发布契约冲突。
  • 补齐配置写入、Profile、logout、URL 规范化和错误映射。
  • 增加 commands E2E,覆盖 help、缺参、dry-run、JSON、Profile、鉴权、网络错误和最低 Node 版本。

另外请确认产品边界:当前实现同时暴露 bailianclaudeqoderarkall。如果首期只支持百炼,应由产品层 policy 禁止其他 provider;如果确定支持多 provider,需要正式设计 provider credential、telemetry、错误归属和安全边界,不能继续统一使用 auth: "none"

当前只有错误映射和 credential bridge 的辅助单测,没有新增 CMA/Agent commands topic E2E。修复后请至少覆盖每个 leaf command 的 help/缺参、dry-run 不联网不写盘、单一 JSON stdout、显式 JSONL、命名 Profile、NETWORK/TIMEOUT、配置/logout 生命周期,以及最低支持 Node 版本 smoke。

Comment thread packages/cli/src/commands.ts Outdated
Comment thread packages/commands/package.json Outdated
Comment thread packages/commands/src/commands/agent/_engine/credentials.ts Outdated
Comment thread packages/commands/src/commands/managed-agent/apply.ts
Comment thread packages/commands/src/commands/managed-agent/apply.ts
Comment thread packages/core/src/auth/store.ts Outdated
Comment thread packages/core/src/config/schema.ts Outdated
Comment thread packages/core/src/client/instrumented-fetch.ts
Comment thread packages/commands/src/commands/managed-agent/plan.ts Outdated
Comment thread packages/commands/src/commands/agent/_engine/credentials.ts Outdated
@XXPermanentXX
XXPermanentXX dismissed their stale review July 27, 2026 14:32

PR 已更新,撤销此前的 Changes requested;剩余问题将单独跟进。

@XXPermanentXX
XXPermanentXX merged commit 7319f6d into main Jul 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants